export function register_scroller_to_bottom(callback: (e: Event) => void) {
	return function (e: Event) {
		const scrollTop = window.scrollY || document.documentElement.scrollTop;
		const offsetHeight = document.documentElement.offsetHeight;
		const clientHeight = document.documentElement.clientHeight;

		if (scrollTop + clientHeight >= offsetHeight) {
			console.debug('load more');
			callback(e); // load more
		}
	};
}
